//
//  CommonTool.h
//  TooToo
//  公共类方法
//  Created by yjyan on 13-1-8.
//  Copyright (c) 2013年 appfactory. All rights reserved.
//

#import <Foundation/Foundation.h>

@class FilterObj;

//
typedef NS_ENUM(NSInteger, KIDScreenSizeType) {
    KIDScreenSizeiPhone4,
    KIDScreenSizeiPhone5,
    KIDScreenSizeiPhone6,
    KIDScreenSizeiPhone6P,
};
@interface CommonTool : NSObject

+(BOOL)canShowShareTool;

//替换字符串中br
+(NSString*)replaceBr:(NSString*)str;
+(void)clearCookie;
+ (NSString *)getTrimText:(NSString *)string;

/*
 *  微信登录获取用户信息
 */
//获取微信token;
+(NSDictionary *)getAccess_token:(NSString *)code;

//根据access_token获取用户信息
+(NSDictionary *)getUserInfo:(NSString * )token;

//是否有键盘
+ (BOOL)findKeyboard;

+(KIDScreenSizeType)ScreenSizeType;

+(NSString *)getTimestamp;

//NSDate to NSString
+(NSString *)changeDate:(NSDate *)date toFormat:(NSString *)formatStr;
//NSString to NSDate
+(NSDate *)changeString:(NSString *)string toFormat:(NSString *)formatStr;

//生成二维码图片
+(UIImage *)encodeQRImageWithContent:(NSString *)content size:(CGSize)size;
//把 View 生成图片
+(UIImage *)getImageByView:(UIView *)view;
//获取相应尺寸的图片URL   size传尺寸字符串，比如@"40"
+(NSString *)getImageUrl:(NSString *)imgUrl size:(NSString *)size;


@end
